<template>
    <div>
<table>
    <thead>
        <tr>
    <th>编号</th>
    <th>账号</th>
    <th>密码</th>
    <th>手机号</th>
  </tr>
    </thead>
<tbody>
    <tr v-for="u in data">
    <td>{{ u.id }}</td>
    <td>{{u.name}}</td>
    <td>******</td>
    <td>165****7878</td>
  </tr>

</tbody>
 
  
</table>
    </div>
</template>

<script setup lang="ts">
    
import { useLoginStore } from '@/stores/logindata';
import axios from 'axios';
import { useRouter } from 'vue-router';
import { ref,onMounted } from 'vue';
const router = useRouter();

const user =useLoginStore();
onMounted(()=>{

var start = user.user.islogin;
if(start==false){
  router.push({path:'/LoginView'})
}
show();
})



const data= ref([
  {
    "id": '',
    "name": "",
    "pwd": ""
  }
])
const show =()=>{
    axios.get('https://localhost:7167/api/Member/GetMember').then(res=>{
       data.value=res.data
    })
}


</script>

<style scoped>

</style>